package com.pingan.pastry.validator;

import com.pingan.pastry.common.exception.ValidatorException;

public class RequiredValidator implements Validator {

    private String message;

    @Override
    public void validate(Object value) throws ValidatorException {
        if (value == null) {
            throw new ValidatorException("参数不能为空");
        }
    }

    @Override
    public void setMessage(String message) {
        this.message = message;
    }
}
